<?php $ufi = $user -> getHtmlId('ufi'); ?>
<div class="uiFriendCardHoverContent pvm">
	<div class="clearfix">
		<ul class="uiPosMenu">
			<li>
				<span class="uiCaption pll">Add to lists:</span>
			</li>
			<?php foreach($lists as $list): ?>
			<?php $style = isset($checkList[$list -> getId()]) ? 'active' : ''; ?>
			<li>
				<form method="post" action="<?php echo Nuo::getUrl('user/ajax/friend/button'); ?>" aria-submit="async">
					<input type="hidden" class="uiHiddenAct" name="act" value="" />
					<input type="hidden" name="user_id" value="<?php echo $user -> getId(); ?>" />
					<input type="hidden" name="list_id" value="<?php echo $list -> getId(); ?>" />
					<a class="uiPosMenuItem" href="" aria-click="jscript" aria-cb="form.submit" aria-act="adduser">
						<span class="uiPosMenuText <?php echo $style; ?>"><?php echo $list -> title; ?></span>
					</a>
					<i class="uiHidden uiIconSmallIndicator">&nbsp;</i>
				</form>
			</li>
			<?php endforeach; ?>
						
			<li id="owfks">
				<div class="pll prl">
					<form method="post" action="<?php echo Nuo::getUrl('user/ajax/friend/button'); ?>" aria-submit="async">
						<input autocomplete="off" maxlength="25" class="inlineTextEditor" name="val" placeholder="Add list"/>
						<input type="hidden" class="uiHiddenAct" name="act" value="addlist" />
						<input type="hidden" name="user_id" value="<?php echo $user -> getId(); ?>" />
						<input type="hidden" name="re" value="#owfks" />
						<button type="submit" class="uiHidden"></button>
						<i class="uiHidden uiIconSmallIndicator">&nbsp;</i>
					</form>
				</div>
			</li>
			<li class="uiMenuSeparator"></li>
			<?php if($statusId == 1): ?>
			<li>
				<form class="inlineBlock" aria-submit="async" action="<?php echo Nuo::getUrl('user/ajax/friend/button'); ?>">
					<input type="hidden" class="uiHidden uiHiddenAct" name="act" value="unfriend" />
					<input type="hidden" class="uiHidden" name="id" value="<?php echo $user -> getItemId(); ?>" />
					<input type="hidden" name="html_id" value="#<?php echo $ufi; ?>" />
					<a class="uiCaption pll" aria-click="jscript" aria-cb="form.submit" aria-act="cancel">Unfriend</a>
				</form>
			</li>
			<?php elseif($statusId == 2): ?>
			<li>
				<form class="inlineBlock" aria-submit="async" action="<?php echo Nuo::getUrl('user/ajax/friend/button'); ?>">
					<input type="hidden" class="uiHidden uiHiddenAct" name="act" value="" />
					<input type="hidden" class="uiHidden" name="id" value="<?php echo $user -> getItemId(); ?>" />
					<input type="hidden" name="html_id" value="#<?php echo $ufi; ?>" />
					<a class="uiCaption pll" aria-click="jscript" aria-cb="form.submit" aria-act="cancel">Cancel Request</a>
				</form>
			</li>
			<?php endif; ?>
		</ul>
	</div>
</div>